package world;

import main.Main.Team;
import graphics.Drawable;

import static org.lwjgl.opengl.GL11.*;

public class Player extends Drawable {

	Team team;
	private boolean alive;

	public Player(Team team) {
		this.team = team;
	}

	public Player(float x, float y, Team team) {
		super(x, y);
		this.team = team;
		alive = false;
	}

	public boolean isAlive() {
		return alive;
	}

	public void setAlive(boolean alive) {
		this.alive = alive;
	}

	@Override
	public void draw() {
		glPushMatrix();
		{
			glTranslatef(x, y, 0);
			glBegin(GL_QUADS);
			{
				glVertex2f(-5f, -5f);
				glVertex2f(-5f, 5f);
				glVertex2f(5f, 5f);
				glVertex2f(5f, -5f);
			}
			glEnd();
		}
		glPopMatrix();
	}

}
